//============================================================================
// Name        : cpp_base64.cpp
// Author      : darkflash
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include "base64_one.h"
#include "base64_two.h"
using namespace std;

int main() {
	string in = "";
	Base64_one base64one;
	Base64_two base64two;

	cout << "input: ";

	cin >> in;

	const unsigned char* cuc_in = reinterpret_cast<const unsigned char*>(in.c_str());

	string encode1 = base64one.base64_encode(cuc_in, in.length());
	string decode1 = base64one.base64_decode(encode1);

	cout << "encode1->" << encode1 << endl;
	cout << "decode1->" << decode1 << endl;

	string encode2 = base64two.base64_encode(in);
	string decode2 = base64two.base64_decode(encode2);

	cout << "encode2->" << encode2 << endl;
	cout << "decode2->" << decode2 << endl;

	return 0;
}
